package routers

import (
	"question-answer/controllers"

	"github.com/astaxie/beego"
)

func init() {
	beego.Router("/", &controllers.MainController{}, "GET:Index")
	beego.Router("/index", &controllers.MainController{}, "GET:Index")
	beego.Router("/login", &controllers.MainController{}, "GET:Login")
	beego.Router("/register", &controllers.MainController{}, "GET:Register")

	//注册
	beego.Router("/register/save", &controllers.MainController{}, "POST:RegisterSave")

	//问题添加 详情
	beego.Router("/question/add", &controllers.QuestionController{}, "GET:Add")
	beego.Router("/question/detail", &controllers.QuestionController{}, "GET:Detail")

	//图片上传
	beego.Router("/upload/imgPage", &controllers.UploadController{}, "GET:UploadImgPage")
	beego.Router("/upload/img", &controllers.UploadController{}, "POST:ImgUpload")
}
